package soccerBet.project.dao;

import java.util.List;

import org.hibernate.Session;

import soccerBet.project.objects.EpocaLiga;
import soccerBet.project.objects.Jogo;
import soccerBet.project.utils.HibernateUtil;

public class EpocaLigaDAO {

	
	
	public List<EpocaLiga> getAllEpocaLiga() {
		Session session = HibernateUtil.getSessionFactory().openSession();
		List<EpocaLiga> epocaligaList = (List<EpocaLiga>)  session.
		createQuery("select el from EpocaLiga as el join fetch el.rondas as r").list();
		
		
		session.close();
		
		return epocaligaList;

	}


	
}
